Uniqueness Constraints on Objectified Associations

نویسنده

  • Terry Halpin
چکیده

Unlike UML and some ER versions, ORM currently allows a fact type to be objectified only if it either has a spanning uniqueness constraint or is a 1:1 binary fact type. This article argues that this restriction should be relaxed, and replaced by a modeling guideline that allows some n-ary associations to be objectified even if their longest uniqueness constraint spans n-1 roles. The pros and cons of removing this restriction are discussed, and illustrated with examples. Introduction In this article, the terms “relationship type”, “association”, and “fact type” all denote typed predicates (e.g. Person plays Sport). In many business domains, it is perfectly natural to think of certain relationship instances as objects about which we wish to talk. This process of making an object out of a relationship is called objectification (also known as reification, or nesting), and is supported by Object-Role Modeling (ORM) [3, 4, 5] and the Unified Modeling Language (UML) [6]. This article assumes basic familiarity with these modeling approaches. The ORM schema in Figure 1(a) objectifies the fact type Person plays Sport as Play, which is then used as an object type in the fact type Play is at SkillLevel. The latter fact type is said to be nested, as it nests another fact type inside it. The exclamation mark “!” appended to “Play” indicates that Play is independent, so instances of Play may exist without participating in other fact types. This is consistent with the optional nature of the first role of Play is at SkillLevel. Figure 1(b) depicts the same example in UML. Here the skill level fact type is represented as an optional attribute on the association class Play. Person Sport “Play !” plays SkillLevel is at Person Sport * * skillLevel [0..1] Play (a) (b) Figure 1 Objectifying an association with a spanning uniqueness constraint in (a) ORM and (b) UML. Popular, industrial versions of Entity Relationship (ER) Modeling typically provide little or no support for objectification. However, academic versions of ER often provide partial or full support for objectification (e.g. see [1]). As an example of partial support, some ER versions allow objectified relationships to have attributes but not to play in other relationships. Notice that the objectified association Person plays Sport has a spanning uniqueness constraint. In early versions of ORM, no association could be objectified unless it had a spanning uniqueness constraint. Later, I relaxed that restriction, to allow binary 1:1 associations to be objectified [2]. Currently, ORM allows no other uniqueness constraint patterns on objectified associations. In particular, ORM forbids the following two kinds of associations to be objectified: (1) An n:1 (or 1:n) binary association (2) A ternary or longer association whose longest uniqueness constraint spans exactly n-1 roles. We exclude from consideration any n-ary association whose longest uniqueness constraint spans fewer than n-1 roles, because such an association is compound rather than elementary. Compound associations can be split into smaller associations without information loss, so may lead to redundancy problems if used as

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Verbalizing Business Rules: Part 8

Business rules should be validated by business domain experts, and hence specified using concepts and languages easily understood by business people. This is the eighth in a series of articles on expressing business rules formally in a high-level, textual language. The first article [4] discussed criteria for a business rules language, and verbalization of simple uniqueness and mandatory constr...

متن کامل

Verbalizing Business Rules : Part 14

Business rules should be validated by business domain experts, and hence specified in a language easily understood by business people. This is the fourteenth in a series of articles on expressing business rules formally in a high-level, textual language. The first article [3] discussed criteria for a business rules language, and verbalization of simple uniqueness and mandatory constraints on bi...

متن کامل

UML data models from an ORM perspective : Part 9

This paper is the ninth in a series of articles examining data modeling in the Unified Modeling Language (UML) from the perspective of Object Role Modeling (ORM). Part 1 discussed historical background, language design criteria, object reference and singlevalued attributes. Part 2 covered multi-valued attributes, basic constraints, and instantiation using UML object diagrams or ORM fact tables....

متن کامل

UML data models from an ORM perspective : Part 10

This paper is the tenth in a series of articles examining data modeling in the Unified Modeling Language (UML) from the perspective of Object Role Modeling (ORM). Part 1 discussed historical background, language design criteria, object reference and singlevalued attributes. Part 2 covered multi-valued attributes, basic constraints, and instantiation using UML object diagrams or ORM fact tables....

متن کامل

UML data models from an ORM perspective : Part 8

This paper is the eighth in a series of articles examining data modeling in the Unified Modeling Language (UML) from the perspective of Object Role Modeling (ORM). Part 1 discussed historical background, design criteria for modeling languages, object reference and single-valued attributes. Part 2 covered multi-valued attributes, basic constraints, and instantiation using UML object diagrams or ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2003